package com.neusoft.neu.fy25g01.n98.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class Person {
    @TableId(type = IdType.AUTO)
    private Integer pid;
    private String name; //       varchar(50)                           not null,
    private String tel;//         char(11)    default '13674136186'     null,
    private String logpwd;//  varchar(18) default '666666'          null,
    private Integer roleid;//    int         default 2                 null,
    private Integer age; //         int                                   null,
    private String email;//varchar(100)                          null,
    private Date created_at;// timestamp   default CURRENT_TIMESTAMP null,
    @TableField(exist = false) // 如果属性名无法与表的列名相对应，那么使用@TableField(exist = false)表示该字段不是数据库字段
    private Role role;
}
